<template>
	<view>
		<view class="tab_hd d_f">
			<view class="w25 m_t_10" @click="go_home(1)">
				<image v-if="idx==1" src="../../../static/img/003.png" mode=""></image>
				<image v-else src="../../../static/img/000.png" mode=""></image>
				<view class="fs12 t_cen m_t_5" :class="idx==1?'blue':'hei'"> 首页 </view>
			</view>
			<view class="w25 m_t_10" @click="go_home(2)">
				<image v-if="idx==2" src="../../../static/img/005.png" mode=""></image>
				<image v-else src="../../../static/img/002.png" mode=""></image>
				<view class="fs12 t_cen m_t_5" :class="idx==2?'blue':'hei'"> 我的 </view>
			</view>
			<!-- 	<view class="w25 mg_t_10" @click="infortion">
				<image v-if="idx==3" src="../../../image/youke/tab003.png" mode=""></image>
				<image v-else src="../../../image/youke/tab0003.png" mode=""></image>
				<view class="fs12 t_cen mg_t_5" :class="idx==3?'rgb0':'rgb9'"> 消息 </view>
			</view>
			<view class="w25 mg_t_10" @click="infortion">
				<image v-if="idx==4" src="../../../image/youke/tab004.png" mode=""></image>
				<image v-else src="../../../image/youke/tab0004.png" mode=""></image>
				<view class="fs12 t_cen mg_t_5" :class="idx==4?'rgb0':'rgb9'"> 我的</view>
			</view> -->
		</view>
	</view>
</template>
s
<script>
	export default {
		props: {
			idx: Number
		},
		data() {
			return {

			}
		},
		onLoad() {
			console.log(this.idx)
			console.log('00000000000')
		},
		methods: {
			go_home(id) {
				if (id == 1) {
					uni.navigateTo({
						url: '../index/index'
					})
				} else if ( id>1 ) {
					uni.navigateTo({
						url: '../mines/mines'
					})
				}
			},
			infortion() {
				uni.showModal({
					title: '请先登录',
					content: '登录后可以查看更多内容，享有更多服务',
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
							uni.navigateTo({ //跳转页面
								url: "../../login/login"
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			}
		}
	}
</script>

<style scoped>
	.tab_hd {
		height: 120rpx;
		background: #FFFFFF;
	}

	.w25 {
		width: 50vw;
	}

	.w25>image {
		width: 48rpx;
		height: 48rpx;
		display: block;
		margin: auto;
		z-index: 99;
	}
</style>
